package one.stand.mapper;

import one.stand.model.CompanyModel;
import one.stand.model.FinanceModel;
import one.stand.response.CompanyResponse;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
public interface CompanyMapper {

    int deleteByPrimaryKey(Integer companyId);

    int insertSelective(CompanyModel record);

    CompanyModel select(CompanyModel record);

    CompanyModel selectCompanyGoodsType(CompanyModel record);

    CompanyModel selectByPrimaryKey(Integer companyId);

    int updateByPrimaryKeySelective(CompanyModel record);

    List<CompanyModel> selectAll(CompanyModel record);

    Integer getAgentCompanyId(Integer companyId);

    Integer getCompanyIsAgent(Integer companyId);

    /**
     * 获取企业信息
     * @param companyId
     * @return
     */
    CompanyResponse crmCompany(Integer companyId);

    CompanyResponse crmCompanyInfo(CompanyModel companyId);

    FinanceModel selectAdminIndexCount(FinanceModel model);

    List<Map<String, Object>> newCustomerList(FinanceModel model);

    List<Map<String, Object>> newCompanyList(FinanceModel model);

    Map<String, Object> dataCenter(FinanceModel model);

    List<Map<String, Object>> newUserCountList(FinanceModel model);

    List<Map<String, Object>> userUseCountList(FinanceModel model);

    List<Map<String, Object>> userSexCount(FinanceModel model);

    List<CompanyModel> selectCompanyList(CompanyModel model);

    List<CompanyModel> selectAgentCompanyList(CompanyModel model);

    CompanyModel getAdminCompanyInfo(CompanyModel model);


    List<CompanyModel> getCompanyByUserPhone(String phone);
}